﻿using System;
using ltModel;

public partial class ltMan_users_userInfo : AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ltModel.Model.article_user aubo = CurrentUser;
            if (aubo != null)
            {
                username.Text = aubo.username;
                truename.Text = aubo.truename;
                cSex.SelectedToggleStateIndex = Str.IsInt(aubo.sex) ? int.Parse(aubo.sex) : Convert.ToBoolean(aubo.sex) ? 1 : 0;
                qq.Text = aubo.oicq;
                email.Text = aubo.email;
                homepage.Text = aubo.homepage;
                beizhu.Text = aubo.jm;
            }
        }
    }
    protected void RadSave_Click(object sender, EventArgs e)
    {
        ltModel.BLL.article_user aubl = new ltModel.BLL.article_user();
        ltModel.Model.article_user aubo = CurrentUser;
        aubo.truename = truename.Text;
        aubo.sex = cSex.SelectedToggleStateIndex.ToString();
        aubo.oicq = qq.Text;
        aubo.email = email.Text;
        aubo.homepage = homepage.Text;
        aubo.jm = beizhu.Text;
        aubl.Update(aubo);
        infoPanel.AddSuccessInfo("修改成功");
        OperateLog.AddSuccessLog(CurrentUser.user_id, Request.UserHostAddress, "个人管理-修改资料");
    }
}